package com.njwb.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.time.LocalDateTime;

@Data
@TableName("t_news")//映射表名
public class News {
    @TableId(value = "t_id",type = IdType.AUTO)
    private Integer id;
    @TableField("t_title")
    private String title;
    @TableField("t_content")
    private String content;
    //LocalDate(年月日) 和 LocalDateTime(年月日时分秒) 3.3版本后推荐使用
    //fill：自动填充策略 插入和修改时自动填充日期
    @TableField(value = "t_createtime",fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @TableField(value = "t_updatetime",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    @TableField("t_deleted")
    @TableLogic(value = "0", delval = "1")//逻辑删除
    private Integer deleted;
}
